{
 "metadata": {
  "name": "",
  "signature": "sha256:9934a3a279fa8da2718e3ec8386012b631040ab0de9dfbe02413d576d57af5fd"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import pandas as pd\n",
      "import numpy as np\n",
      "import matplotlib.pyplot as plt"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "Traceback (most recent call last):\n",
        "  File \"/usr/lib/python3.4/logging/__init__.py\", line 982, in emit\n",
        "    self.flush()\n",
        "  File \"/usr/lib/python3.4/logging/__init__.py\", line 962, in flush\n",
        "    self.stream.flush()\n",
        "OSError: [Errno 5] Input/output error\n",
        "Call stack:\n",
        "  File \"<string>\", line 1, in <module>\n",
        "  File \"/usr/lib/python3.4/site-packages/IPython/kernel/zmq/kernelapp.py\", line 469, in main\n",
        "    app.start()\n",
        "  File \"/usr/lib/python3.4/site-packages/IPython/kernel/zmq/kernelapp.py\", line 459, in start\n",
        "    ioloop.IOLoop.instance().start()\n",
        "  File \"/usr/lib/python3.4/site-packages/zmq/eventloop/ioloop.py\", line 151, in start\n",
        "    super(ZMQIOLoop, self).start()\n",
        "  File \"/usr/lib/python3.4/site-packages/tornado/ioloop.py\", line 837, in start\n",
        "    handler_func(fd_obj, events)\n",
        "  File \"/usr/lib/python3.4/site-packages/tornado/stack_context.py\", line 275, in null_wrapper\n",
        "    return fn(*args, **kwargs)\n",
        "  File \"/usr/lib/python3.4/site-packages/zmq/eventloop/zmqstream.py\", line 433, in _handle_events\n",
        "    self._handle_recv()\n",
        "  File \"/usr/lib/python3.4/site-packages/zmq/eventloop/zmqstream.py\", line 465, in _handle_recv\n",
        "    self._run_callback(callback, msg)\n",
        "  File \"/usr/lib/python3.4/site-packages/zmq/eventloop/zmqstream.py\", line 407, in _run_callback\n",
        "    callback(*args, **kwargs)\n",
        "  File \"/usr/lib/python3.4/site-packages/tornado/stack_context.py\", line 275, in null_wrapper\n",
        "    return fn(*args, **kwargs)\n",
        "  File \"/usr/lib/python3.4/site-packages/IPython/kernel/zmq/ipkernel.py\", line 281, in dispatcher\n",
        "    return self.dispatch_shell(stream, msg)\n",
        "  File \"/usr/lib/python3.4/site-packages/IPython/kernel/zmq/ipkernel.py\", line 224, in dispatch_shell\n",
        "    self.log.debug('\\n*** MESSAGE TYPE:%s***', msg_type)\n",
        "Message: '\\n*** MESSAGE TYPE:%s***'\n",
        "Arguments: ('execute_request',)\n",
        "--- Logging error ---\n",
        "Traceback (most recent call last):\n",
        "  File \"/usr/lib/python3.4/logging/__init__.py\", line 982, in emit\n",
        "    self.flush()\n",
        "  File \"/usr/lib/python3.4/logging/__init__.py\", line 962, in flush\n",
        "    self.stream.flush()\n",
        "OSError: [Errno 5] Input/output error\n",
        "Call stack:\n",
        "  File \"<string>\", line 1, in <module>\n",
        "  File \"/usr/lib/python3.4/site-packages/IPython/kernel/zmq/kernelapp.py\", line 469, in main\n",
        "    app.start()\n",
        "  File \"/usr/lib/python3.4/site-packages/IPython/kernel/zmq/kernelapp.py\", line 459, in start\n",
        "    ioloop.IOLoop.instance().start()\n",
        "  File \"/usr/lib/python3.4/site-packages/zmq/eventloop/ioloop.py\", line 151, in start\n",
        "    super(ZMQIOLoop, self).start()\n",
        "  File \"/usr/lib/python3.4/site-packages/tornado/ioloop.py\", line 837, in start\n",
        "    handler_func(fd_obj, events)\n",
        "  File \"/usr/lib/python3.4/site-packages/tornado/stack_context.py\", line 275, in null_wrapper\n",
        "    return fn(*args, **kwargs)\n",
        "  File \"/usr/lib/python3.4/site-packages/zmq/eventloop/zmqstream.py\", line 433, in _handle_events\n",
        "    self._handle_recv()\n",
        "  File \"/usr/lib/python3.4/site-packages/zmq/eventloop/zmqstream.py\", line 465, in _handle_recv\n",
        "    self._run_callback(callback, msg)\n",
        "  File \"/usr/lib/python3.4/site-packages/zmq/eventloop/zmqstream.py\", line 407, in _run_callback\n",
        "    callback(*args, **kwargs)\n",
        "  File \"/usr/lib/python3.4/site-packages/tornado/stack_context.py\", line 275, in null_wrapper\n",
        "    return fn(*args, **kwargs)\n",
        "  File \"/usr/lib/python3.4/site-packages/IPython/kernel/zmq/ipkernel.py\", line 281, in dispatcher\n",
        "    return self.dispatch_shell(stream, msg)\n",
        "  File \"/usr/lib/python3.4/site-packages/IPython/kernel/zmq/ipkernel.py\", line 225, in dispatch_shell\n",
        "    self.log.debug('   Content: %s\\n   --->\\n   ', msg['content'])\n",
        "Message: '   Content: %s\\n   --->\\n   '\n",
        "Arguments: {'code': 'import pandas as pd\\nimport numpy as np\\nimport matplotlib.pyplot as plt', 'store_history': True, 'user_variables': [], 'silent': False, 'allow_stdin': True, 'user_expressions': {}}\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "s = pd.Series([1,3,5,np.nan, 6,8])\n",
      "s"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 5,
       "text": [
        "0     1\n",
        "1     3\n",
        "2     5\n",
        "3   NaN\n",
        "4     6\n",
        "5     8\n",
        "dtype: float64"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "dates = pd.date_range('20130101', periods=6)\n",
      "dates\n",
      "df = pd.DataFrame(np.random.rand(6,4), index=dates, columns=list('ABCD'))\n",
      "df"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>A</th>\n",
        "      <th>B</th>\n",
        "      <th>C</th>\n",
        "      <th>D</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>2013-01-01</th>\n",
        "      <td> 0.759669</td>\n",
        "      <td> 0.758603</td>\n",
        "      <td> 0.235619</td>\n",
        "      <td> 0.456837</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>2013-01-02</th>\n",
        "      <td> 0.941880</td>\n",
        "      <td> 0.229339</td>\n",
        "      <td> 0.596766</td>\n",
        "      <td> 0.914884</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>2013-01-03</th>\n",
        "      <td> 0.173570</td>\n",
        "      <td> 0.835382</td>\n",
        "      <td> 0.077137</td>\n",
        "      <td> 0.991346</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>2013-01-04</th>\n",
        "      <td> 0.354135</td>\n",
        "      <td> 0.760678</td>\n",
        "      <td> 0.239118</td>\n",
        "      <td> 0.735928</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>2013-01-05</th>\n",
        "      <td> 0.014698</td>\n",
        "      <td> 0.581050</td>\n",
        "      <td> 0.184227</td>\n",
        "      <td> 0.885214</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>2013-01-06</th>\n",
        "      <td> 0.913140</td>\n",
        "      <td> 0.712108</td>\n",
        "      <td> 0.561046</td>\n",
        "      <td> 0.727615</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "</div>"
       ],
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 11,
       "text": [
        "                   A         B         C         D\n",
        "2013-01-01  0.759669  0.758603  0.235619  0.456837\n",
        "2013-01-02  0.941880  0.229339  0.596766  0.914884\n",
        "2013-01-03  0.173570  0.835382  0.077137  0.991346\n",
        "2013-01-04  0.354135  0.760678  0.239118  0.735928\n",
        "2013-01-05  0.014698  0.581050  0.184227  0.885214\n",
        "2013-01-06  0.913140  0.712108  0.561046  0.727615"
       ]
      }
     ],
     "prompt_number": 11
    }
   ],
   "metadata": {}
  }
 ]
}